package com.t5;

/**
 * Created by xuyiwei on 2018/7/14.
 */
class Leaf{
    int i = 0;
    Leaf increment(){
        i++;
        return this;
    }

    void print(){
        System.out.println(" i = "+i);
    }
}
public class T_5_4 {
    public static void main(String[] args) {
        Leaf xz = new Leaf();
        xz.increment().increment().increment().increment().print();
    }
}
